﻿@model IEnumerable<Parking.Models.Position>

@{
    ViewBag.Title = "SearchLocationAndNumber";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>SearchLocationAndNumber</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
    @using (Html.BeginForm("SearchLocationAndNumber", "Positions", FormMethod.Get))
    {
        <p>Location: @Html.DropDownList("positionsLocations", "All")  
            Number: @Html.TextBox("SearchString")  
            <input type="submit" value="Filter" /></p>
    }
<table>
    <tr>
        <th>
            Number
        </th>
        <th>
            Location
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Number)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Location)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.PositionId }) |
            @Html.ActionLink("Details", "Details", new { id=item.PositionId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.PositionId })
        </td>
    </tr>
}

</table>
